const FormatUtils = {
    formatFileSize: (fileSize: number): string => {
        const units = ["B", "KB", "MB", "GB", "TB"];
        let index = 0;

        while (fileSize >= 1024 && index < units.length - 1) {
            fileSize /= 1024;
            index++;
        }

        return `${fileSize.toFixed(2)} ${units[index]}`;
    }

}
export default FormatUtils